/*
	This file is part of "Ants on the web".

    "Ants on the web" is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    "Ants on the web" is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with "Ants on the web".  If not, see <http://www.gnu.org/licenses/>.
*/

package org.utc.ia04.antsontheweb.gui.request.actionListener;

import jade.gui.GuiEvent;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import org.utc.ia04.antsontheweb.gui.request.AgentInterfaceRequest;
import org.utc.ia04.antsontheweb.gui.request.InterfaceRequest;
import org.utc.ia04.antsontheweb.utilities.Requete;

public class StopSimulationActionListener implements ActionListener
{
	InterfaceRequest myFrame;
	public StopSimulationActionListener(InterfaceRequest _myFrame) { myFrame = _myFrame; }
	
	public void actionPerformed(ActionEvent evt)
	{
		GuiEvent ev = new GuiEvent(myFrame.getMyAgent(), AgentInterfaceRequest.SEND_TO_ACO);
		ev.addParameter(Requete.GUI_ENDSIMULATION);
		ev.addParameter(null);
		myFrame.toggleButton();
		myFrame.getMyAgent().postGuiEvent(ev);
	}
}
